Priority Queues and Sorting for Read-Only Data
نویسندگان
چکیده
We revisit the random-access-machine model in which the input is given on a read-only random-access media, the output is to be produced to a write-only sequential-access media, and in addition there is a limited random-access workspace. The length of the input is N elements, the length of the output is limited by the computation itself, and the capacity of the workspace is O(S + w) bits, where S is a parameter specified by the user and w is the number of bits per machine word. We present a state-of-the-art priority queue—called an adjustable navigation pile—for this model. Under some reasonable assumptions, our priority queue supports minimum and insert in O(1) worst-case time and extract in O(N/S+lgS) worst-case time, where lgN ≤ S ≤ N/ lgN . We also show how to use this data structure to simplify the existing optimal O(N/S +N lgS)-time sorting algorithm for this model.
منابع مشابه
Equivalence between Priority Queues and Sorting in External Memory
A priority queue is a fundamental data structure that maintains a dynamic ordered set of keys and supports the followig basic operations: insertion of a key, deletion of a key, and finding the smallest key. The complexity of the priority queue is closely related to that of sorting: A priority queue can be used to implement a sorting algorithm trivially. Thorup [11] proved that the converse is a...
متن کامل2 Priority Queue
In the last lecture, we discussed algorithms for integer sorting. In this lecture we will discuss the relationship between integer sorting algorithms and priority queue data structures. It is obvious that fast priority queues imply fast sorting, since if a priority queue can do Insert and Deletemin in O(f(n)), then we can sort in O(nf(n)) by inserting all elements into the queue then calling De...
متن کاملOblivious Sorting and Queues
We present a deterministic oblivious LIFO (Stack), FIFO, double-ended and double-ended priority queue as well as an oblivious mergesort and quicksort algorithm. Our techniques and ideas include concatenating queues end-to-end, size balancing of multiple arrays, several multi-level partitionings of an array. Our queues are the first to enable executions of pop and push operations without any cha...
متن کاملPriority Queue Sorting and Labeled Trees
The priority queue discussed in this talk is an abstract data type supporting theoperations INSERT and DELETEMIN, which transforms an input permutation σ oflength n to an output permutation τ . Atkinson and Thiyagarajah [2] proved that suchpairs (σ, τ) are counted by (n + 1)n−1. This is also well known as Cayley’s formulain graph theory, which counts the number of labeled trees ...
متن کاملPriority Queues and Sorting Methods for Parallel Simulation
We examine the design, implementation, and experimental analysis of parallel priority queues for device and network simulation. We consider: a) distributed splay trees using MPI, b) concurrent heaps using shared memory atomic locks, and c) a new, more general concurrent data structure based on distributed sorted lists, which is designed to provide dynamically balanced work allocation (with auto...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2013